package com.joker.demo;


/**
 * @author : feixiang.li
 * @since : 2025-09-26 18:00
 */
public class TTsExample {
    public static void main(String[] args) {
        long startTime = System.currentTimeMillis();
        String text = "李飞翔。我好爱你。";
        // 方式1: 获取完整响应对象
        TextToSpeechProcessor.TTSResponse response = TextToSpeechProcessor.textToSpeech(text);
        System.out.println(response.toString());
        long endTime = System.currentTimeMillis();
        System.out.println("请求耗时：" + (endTime - startTime) + "毫秒");
        // 保存为MP3文件
        response.saveToFile("output.mp3");


    }
}
